******************************************************
**IMPLEMENTING PARTNER SURVEYS DATA ANALYSIS**********
**Last Edit: June 6, 2022, by KB**********************
******************************************************

use "data/Uganda_IPsurvey_politicianlevelobs.dta", clear

************
**FIGURE 2**
************

*see R code for graph

tab lobbied politician, col
tab bureaucraticassistance politician, col
tab monitored politician, col
tab organized politician, col
tab other politician, col

tab lobbied northern, col
tab bureaucraticassistance northern, col
tab monitored northern, col
tab organized northern, col
tab other northern, col

***********
**TABLE 3**
***********

reg num_ LC3 MP, cluster(a4_subcounty)

reg num_ LC3 MP NRM northern, cluster(a4_subcounty)

reg num_ LC3 northern, cluster(a4_subcounty)

***********
*FIGURE 3**
***********

*see R-code for graph

ttest num_ if politician=="LC3", by(critical_di) 
ttest num_ if politician=="LC5c", by(critical_di) 
ttest num_ if politician=="MP", by(critical_di)

ttest num_, by(critical_di) 
reg critical_di num_, cluster(a4_subcounty)

ttest num_ if politician=="LC3", by(timelycompletion) 
ttest num_ if politician=="LC5c", by(timelycompletion) 
ttest num_ if politician=="MP", by(timelycompletion) 

ttest num_, by(timelycompletion) 
reg timelycompletion num_, cluster(a4_subcounty)


****************************
